package com.knife.permission.entity;

import java.util.StringJoiner;

/**
 * 数据权限
 *
 * @author tianhao.luo@hand-china.com
 */
public class DataPermission {
    /**
     * 条件
     */
    private String whereSql;
    /**
     * 左连接语句
     */
    private String leftJoinSql;


    @Override
    public String toString() {
        return new StringJoiner(", ", DataPermission.class.getSimpleName() + "[", "]")
                .add("whereSql='" + whereSql + "'")
                .add("leftJoinSql='" + leftJoinSql + "'")
                .toString();
    }

    public DataPermission() {
    }

    public DataPermission(String whereSql, String leftJoinSql) {
        this.whereSql = whereSql;
        this.leftJoinSql = leftJoinSql;
    }

    public String getWhereSql() {
        return whereSql;
    }

    public void setWhereSql(String whereSql) {
        this.whereSql = whereSql;
    }

    public String getLeftJoinSql() {
        return leftJoinSql;
    }

    public void setLeftJoinSql(String leftJoinSql) {
        this.leftJoinSql = leftJoinSql;
    }
}
